#include <stdio.h>
#include <stdlib.h>

struct gate
{
	int num;
	char *data;
};

static struct gate *gate_p = NULL;

void _gate_make()
{
	gate_p = (struct gate*)malloc(sizeof(struct gate));
}

struct gate* gate_get()
{
	return gate_p;
}

int gate_init()
{
	_gate_make();
	if(NULL == gate_p)
	{
		return 2;
	}
	return 1;
}
